package client.view;

import java.awt.Color;
import java.awt.Image;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.rmi.RemoteException;
import java.awt.image.*;

import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JPasswordField;
import javax.swing.JPanel;
import javax.swing.JTextField;

import server.model.remotes.IMeetingService;

public class MainGui extends JPanel {
	
	private GuiManager manager;
	private JLabel lblInfo;

	private JButton btnLogin;
	private JButton btnRegister;
	private Image bgImage;
	

	public MainGui(GuiManager manager) {
		this.manager = manager;
		setSize(585, 365);
		setLocation(0, 0);
		setVisible(true);
		setLayout(null);

		initGUI();
	}

	private void initGUI() {

		lblInfo = new JLabel();
		lblInfo.setText("Maak uw keuze");
		lblInfo.setBounds(31, 12, 300, 20);
		lblInfo.setFont(new java.awt.Font("Segoe UI", 1, 14));

		btnRegister = new JButton("Registreren");
		btnRegister.setBounds(31, 107, 120, 22);
		btnRegister.addActionListener(new btnRegisterListener());
		btnLogin = new JButton("Inloggen");
		btnLogin.setBounds(31, 80, 120, 22);
		btnLogin.addActionListener(new btnLoginListener());
		
				
		add(lblInfo);

		add(btnRegister);		
		add(btnLogin);	
		
		repaint();
	}
	
	private class btnRegisterListener implements ActionListener{

		public void actionPerformed(ActionEvent arg0) {
			manager.switchScreen("registerGui");
		}
		
	}
	
	private class btnLoginListener implements ActionListener{

		public void actionPerformed(ActionEvent arg0) {
			manager.switchScreen("loginGui");
		}
		
	}


}
